<!-- directive:title 云袭表单 投入项目使用 五星评级 -->
<!-- directive:breadcrumb 表单插件集1.4 -->
<div class='wrapper-md'>
    <form class="form-yx" name="From">
        <b class="form-yx-title">重新整理的表单</b>
        <p><code>[数字且15-300]</code><kbd>obj.a01 = {{obj.a01}}</kbd></p>
        <div class="form-yx-box">
            <label class="form-yx-label must">输入框</label>
            <div class="form-yx-control">
                <input type="text" placeholder="请输入标题" style="width:200px;" class=""
                    ng-model="obj.a01" name="o01" maxlength="3"
                    required ui-validate=" '$value>=15&&$value<=300' " ng-change="a01changea02()">
                <b ng-show="( From.o01.$dirty || From.submitted ) && From.o01.$invalid">
                    {{From.o01.$error.required?"必填项":"请输入15-300"}}
                </b>
            </div>
            <div class="form-yx-control" ng-show="( From.o01.$dirty || From.submitted ) && From.o01.$invalid">
                <b>还可以在这里显示错误,{{From.o01.$error.required?"必填项":"请输入15-300"}}</b>
            </div>
        </div>
        <p><code>[开启关闭/开启后选择时间/不能大于已知值]</code><kbd>obj.a02 = {{obj.a02}}</kbd></p>
        <div class="form-yx-box" style="padding-bottom:10px;">
            <label class="form-yx-label must">开关</label>
            <div class="form-yx-control">
                <label class="checkbox-inline i-checks"> <input type="radio" ng-checked="obj.a02>0" ng-click="obj.a02='15'"> <i></i>开启</label>
                <label class="checkbox-inline i-checks"> <input type="radio" ng-checked="obj.a02==0" ng-click="obj.a02='0'"> <i></i>关闭</label>
            </div>
            <div class="form-yx-control" ng-show="obj.a02>0">
                <label class="checkbox-inline i-checks" > <input type="radio" ng-model="obj.a02" convert-to-number value="15"> <i></i>15</label>
                <label class="checkbox-inline i-checks" ng-show="title>=30"> <input type="radio" ng-model="obj.a02" convert-to-number value="30"> <i></i>30</label>
                <label class="checkbox-inline i-checks" ng-show="title>=60"> <input type="radio" ng-model="obj.a02" convert-to-number value="60"> <i></i>60</label>
            </div>
            <div class="form-yx-control">
                <b>注意一下这里 当你需要的i-check控件被加以ngif判断时候 会失去双向绑定的效果</b>
                <br>
                <b>convert-to-number指令可以解决数字类型不被 单选/下拉框 识别的问题</b>
            </div>
        </div>
        <b class="form-yx-title">设置产品信息</b>
        <p><code>[同行放两个输入框/只第一个必填]</code><kbd>obj.a03 = {{obj.a03}}</kbd>|<kbd>obj.a04 = {{obj.a04}}</kbd></p>
        <div class="form-yx-box">
            <label class="form-yx-label must">输入框</label>
            <div class="form-yx-control">
                <input type="text" placeholder="请输入标题" style="width:200px;" class=""
                    ng-model="obj.a03" name="o03" maxlength="20" required>
                <i>{{ obj.a03.length || 0 }} / 20</i>
                <input type="text" placeholder="请输入副标题" style="width:200px;" class=""
                    ng-model="obj.a04" name="o04" maxlength="20">
                <i>{{ obj.a04.length || 0 }} / 20</i>
                <b ng-show="( From.o03.$dirty || From.submitted ) && From.o03.$invalid">
                    {{From.o03.$error.required?"标题是必填项":"错误"}}
                </b>
            </div>
            <div class="form-yx-control">
                <b class="note">通知 : 阿斯顿发撒发送飞萨芬大声的发生发生的发生的发生的发生的</b>
            </div>
        </div>
        <p><code>[选择框]</code><kbd>obj.a05 = {{obj.a05}}</kbd>|<kbd>obj.a06 = {{obj.a06}}</kbd></p>
        <div class="form-yx-box">
            <label class="form-yx-label must">选择框</label>
            <div class="form-yx-control">
                <input type="text" select2 style="width:200px;" name="o05"
                    ng-model="obj.a05" nosearch dataset="nameSource" select2model="obj.a05m" />
                <i>{{ obj.name }}</i>
                <input type="text" select2 style="width:200px;" name="o06"
                    ng-model="obj.a06" nosearch dataset="nameSource" select2model="obj.a06m" />
                <b class="note">请输入20字以内的标题</b>
            </div>
            <div class="form-yx-control">
                <b>Expression 'undefined' in attribute 'select2Model' used with directive 'select2' is non-assignable!</b>
                <b class="note">与指令'select2'一起使用的属性'select2Model'中的表达式'undefined'是不可赋值的！</b>
            </div>
        </div>
        <p><code>[单选框/小弟panel条件显示]</code><kbd>obj.a07 = {{obj.a07}}</kbd>|<kbd>obj.a08 = {{obj.a08}}</kbd></p>
        <div class="form-yx-box" style="padding-bottom:10px;">
            <label class="form-yx-label must">领取方式</label>
            <div class="form-yx-control">
                <label class="checkbox-inline i-checks"> <input type="radio" ng-model="obj.a07" convert-to-number value="0"> <i></i>线下核销</label>
                <label class="checkbox-inline i-checks"> <input type="radio" ng-model="obj.a07" convert-to-number value="1"> <i></i>邮寄</label>
            </div>
            <div class="form-yx-control" ng-show="obj.a07==0">
                <input type="text" placeholder="请输入兑换产品的地址" style="width:250px;" class=""
                    ng-model="obj.a08" name="o08" maxlength="20" ng-required="obj.a07==0">
                <b ng-class="{ 'note' : !(( From.o08.$dirty || From.submitted ) && From.o08.$invalid) }">
                    必填项
                </b>
            </div>
        </div>
        <p><code>[文本域]</code><kbd>obj.a09 = {{obj.a09}}</kbd></p>
        <div class="form-yx-box" style="padding-bottom:10px;">
            <label class="form-yx-label must">简介</label>
            <div class="form-yx-control">
                <textarea placeholder="请输入简介" style="width:400px;" class=""
                    ng-model="obj.a09" name="o09" rows="3" maxlength="64" required>
                </textarea>
                <i>{{ obj.a09.length || 0 }} / 64</i>
            </div>
            <div class="form-yx-control" ng-show="( From.o09.$dirty || From.submitted ) && From.o09.$invalid">
                <b>{{From.o09.$error.required?"必填项":""}}</b>
            </div>
        </div>
        <p><code>[数字输入框::不完美]</code><kbd>obj.a10 = {{obj.a10}}</kbd></p>
        <div class="form-yx-box" style="padding-bottom:10px;">
            <label class="form-yx-label must">市面价格</label>
            <div class="form-yx-control">
                <input type="number" placeholder="请输入数字" style="width:200px;" class=""
                    ng-model="obj.a10" name="o10" maxlength="20" required>
                <b class="note">元</b>
                <b class="note" ng-hide="( From.o10.$dirty || From.submitted ) && From.o10.$invalid">
                    该产品的市场价格或原价，用作展示
                </b>
                <b ng-show="( From.o10.$dirty || From.submitted ) && From.o10.$invalid">
                    {{From.o10.$error.required?"必填项":""}}
                </b>
            </div>
        </div>
        <p><code>[数字输入框插件]</code><kbd>obj.a11 = {{obj.a11}}</kbd></p>
        <div class="form-yx-box" style="padding-bottom:10px;">
            <label class="form-yx-label must">库存</label>
            <div class="form-yx-control">
                <input type="text" placeholder="请输入可兑换数量" style="width:200px;" class=""
                    ng-model="obj.a11" name="o11" maxlength="3"
                    codeonly-number required ui-validate="{ a:'$value >= 5', b:'$value <= 50' }">
                <b class="note" ng-hide="( From.o11.$dirty || From.submitted ) && From.o11.$invalid">
                    只能输入数字 5-50开区间
                </b>
                <b ng-show="( From.o11.$dirty || From.submitted ) && From.o11.$invalid">
                    {{From.o11.$error.required?"必填项":"5-50开区间"}}
                </b>
            </div>
        </div>
        <p><code>[数字小数输入框插件]</code><kbd>obj.a12 = {{obj.a12}}</kbd></p>
        <div class="form-yx-box" style="padding-bottom:10px;">
            <label class="form-yx-label must">市面价格</label>
            <div class="form-yx-control">
                <input type="text" placeholder="请输入数字" style="width:200px;" class=""
                    ng-model="obj.a12" name="o12" maxlength="4" 
                    codeonly-digital codeonly-digital-dot="2" required ui-validate="{ a:'$value >= 10', b:'$value <= 50' }">
                <b class="note">元</b>
                <b class="note" ng-hide="( From.o12.$dirty || From.submitted ) && From.o12.$invalid">
                    只能输入数字 小数点 10-50开区间
                </b>
                <b ng-show="( From.o12.$dirty || From.submitted ) && From.o12.$invalid">
                    {{From.o12.$error.required?"必填项":"10-50开区间"}}
                </b>
            </div>
        </div>
        <p><code>[开关]</code><kbd>obj.a13 = {{obj.a13}}</kbd></p>
        <div class="form-yx-box" style="padding-bottom:10px;">
            <label class="form-yx-label">是否上架</label>
            <div class="form-yx-control">
                <span class="checkbox-inline i-switch" ng-click="a13change()">
                    <input type="checkbox" ng-checked='obj.a13' disabled> <i></i>
                </span>
            </div>
            <div class="form-yx-control">
                <b class="note">这么做的原因是不能在判断允许改变状态前就改了状态！</b>
            </div>
        </div>
        <p><code>[0代表不限]</code><kbd>obj.a14 = {{obj.a14}}</kbd></p>
        <div class="form-yx-box" style="padding-bottom:10px;">
            <label class="form-yx-label must">用户兑换限制</label>
            <div class="form-yx-control">
                <input type="number" placeholder="请输入用户兑换限制" style="width:200px;" class=""
                    ng-model="obj.a14" name="o14" maxlength="20" required>
                <b class="note">0代表不限兑！</b>
                <b ng-show="( From.o14.$dirty || From.submitted ) && From.o14.$invalid">
                    {{From.o14.$error.required?"必填项":"10-50开区间"}}
                </b>
            </div>
        </div>
        <p><code>[富文本]</code><kbd>obj.a15 = {{obj.a15}}</kbd></p>
        <div class="form-yx-box">
            <label class="form-yx-label">兑换说明</label>
            <div class="form-yx-control" style="width: 445px;">
                <textarea ui-tinymce="tinymceOptions" placeholder="请输入用户兑换说明" name="o15" ng-model="obj.a15" required></textarea>
            </div>
            <div class="form-yx-control" ng-show="( From.o15.$dirty || From.submitted ) && From.o15.$invalid">
                <b>{{From.o15.$error.required?"必填项":""}}</b>
            </div>
        </div>
        <div class="form-yx-box">
            <label class="form-yx-label">产品主图</label>
            <div class="form-yx-control">
                <span class="imgall" ng-repeat="row in obj.a16">
                    <img ng-src="{{row.imgurl?puburl+row.imgurl:''}}">
                    <span>
                        <small class="imgdel" ng-class="{true:'onlyImgdel'}[obj.a16.length==1]" ng-click="obj.a16.splice($index,1);"></small>
                    </span>
                </span>
                <img src="../../images/img.addpic.jpg" ng-show="obj.a16.length<1" ng-click="clickone()">
                <span ng-show="From.submitted && obj.a16.length==0" style="color:red;margin-left:15px;">必填项</span>
            </div>
            <div class="form-yx-control">
                <b class="note">建议尺寸为750像素*400像素,格式为‘.jpg', '.jpeg', '.png'！</b>
            </div>
        </div>
        <div class="form-yx-box">
            <label class="form-yx-label"></label>
            <div class="form-yx-control" >
                <label class="checkbox-inline i-checks"> <input type="checkbox" name="agreement" ng-model="obj.agreement" required>
                    <i></i>
                    我已阅读并接受 <a style="color: #E67067;text-decoration: underline;" href="javascript:;">《业务合作协议》</a>
                </label>
            </div>
             <div class="form-yx-msg-box">
                <span class="form-yx-msg-error" ng-show="( ( fm.agreement.$dirty || fm.submitted ) && fm.agreement.$error.required )">请阅读协议</span>
             </div>
        </div>
        <div class="form-yx-box">
            <label class="form-yx-label">产品详情</label>
            <div class="form-yx-control">
                <div class="banner_edit taocan" style="margin-top:0;">
                    <div class="banner_edit_div">
                        <div style="padding:25px 0 10px" ng-show="detial.length>0">
                            <div class="edit_div" ng-repeat="detialTime in detial">
                                <div class="edit_btn">
                                    <span ng-show="$index!=0" ng-click="imgup(detialTime,$index,detial)"><small></small><i>上移</i></span>
                                    <span ng-click="imgdown(detialTime,$index,detial)" ng-show="$index!=(detial.length-1)"><small></small><i>下移</i></span>
                                    <span ng-click="editDetial(detialTime,$index)"><small></small><i>编辑</i></span>
                                    <span ng-class="{true:'onlyImgdel'}[detial.length==1]" ng-click="imgdel(detialTime,$index,detial)"><small></small><i>删除</i></span>
                                </div>
                                <div class="edit_text" ng-show="detialTime.context">{{detialTime.context}}</div>
                                <div class="edit_text" ng-show="detialTime.image_desc">
                                    <img ng-src="{{puburl+detialTime.image_desc}}" style="width:340px;">
                                </div>
                                <div class="edit_text" ng-show="detialTime.video">{{detialTime.video}}</div>
                            </div>
                        </div>
                        <div class="addClass" ng-show="tapText">
                            <textarea rows="3" placeholder="请输入服务描述" maxlength="50" ng-model="addVal" style="color:#333"></textarea>
                            <p>
                                <b>{{addVal.length?addVal.length:0}} / 50 字</b>
                                <span class="testSure" ng-click="testSure(addVal)">确认</span>
                                <span ng-click="testCancel()">取消</span>
                            </p>
                        </div>
                        <div class="addClass" ng-show="tapVideo">
                            <p style="margin:0 0 8px 0;">视频地址</p>
                            <input type="text" style="width:100%;height:40px;" placeholder="请输入视频地址" ng-model="addUrl">
                            <p>
                                <b style="font-size:0;">请输入视频地址</b>
                                <span class="testSure" ng-click="videoSure(addUrl)">确认</span>
                                <span ng-click="videoCancel()">取消</span>
                            </p>
                        </div>
                        <div class="banner_edit_footer">
                            <dl class='addone'>
                                <dt></dt>
                                <dd>添加</dd>
                            </dl>
                            <dl class='add_text' ng-click="addtext('video')">
                                <dt></dt>
                                <dd>视频</dd>
                            </dl>
                            <dl class='add_text' ng-click="clickfun2()">
                                <dt></dt>
                                <dd>图片</dd>
                            </dl>
                            <dl class='add_text' ng-click="addtext('text')">
                                <dt></dt>
                                <dd>文字</dd>
                            </dl>
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-yx-msg-box">
                <span class="form-yx-msg-error" ng-show="From.submitted && detial.length==0">必填项</span>
            </div>
        </div>
        <!-- 提交 -->
        <div class="form-yx-box" style="padding-bottom:10px;">
            <div class="form-yx-control">
                <button type="button" class="btn btn-danger">提交表单</button>
            </div>
        </div>
    </form>
</div>